class CreateSubtopics < ActiveRecord::Migration
  def self.up
    create_table :subtopics do |t|
      t.column "topic_id", :int, :null => false
      t.column "name", :string, :null => false
      t.column "name_en", :string, :null => false
      t.column "code", :int, :null => false
      t.column "xflag", :char, :null => false, :default => 'E'
      t.timestamps
    end
  end

  def self.down
    drop_table :subtopics
  end
end
